package bluejack.operation;
import nme.events.TimerEvent;
import nme.utils.Timer;


/**
 * 延时
 * @author BlueJack
 */

class DelayOper extends Oper
{
	//延时时间，毫秒为单位
	public var delay:Int;
	
	public function new(delay:Int = 1000) {
		super();
		this.delay = delay;
	}
	
	override public function execute():Void {
		var timer:Timer = new Timer(delay,1);
		timer.addEventListener(TimerEvent.TIMER_COMPLETE, result);
		timer.start();
		super.execute();
	}
	
}